home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / lib / partman / active_partition / 15method / choices next >
Encoding:
Text File  |  2009-04-19  |  641 b   |  35 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. dev=$1
  6. id=$2
  7. cd $dev
  8.  
  9. if [ -f $id/method ]; then
  10.     method=$(cat $id/method)
  11. else
  12.     method=dont_use
  13. fi
  14.  
  15. if [ -f $id/filesystem ] && \
  16.    ([ "$method" = keep ] || [ "$method" = format ]); then
  17.     fs=$(cat $id/filesystem)
  18.     db_metaget partman/filesystem_long/$fs description || RET=''
  19.     if [ "$RET" ]; then
  20.         description="$RET"
  21.     else
  22.         description="$fs"
  23.     fi
  24. else
  25.     db_metaget partman/method_long/$method description || RET=''
  26.     if [ "$RET" ]; then
  27.         description="$RET"
  28.     else
  29.         description="$method"
  30.     fi
  31. fi
  32.  
  33. db_metaget partman-target/text/method description
  34. printf "method\t%s\${!TAB}%s\n" "${RET}" "$description"
  35.